import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @USER: Administrator
 * @DATE: 2024/9/15 上午11:08
 * @VERSION: 1.0.0
 */
public class LC1200 {
    public static void main(String[] args) {

    }

    public List<List<Integer>> minimumAbsDifference(int[] arr) {
        List<List<Integer>> result = new ArrayList<>();
        Arrays.sort(arr);

        // 找到最小差
        int minSub = Integer.MAX_VALUE;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] - arr[i - 1] < minSub) {
                minSub = arr[i] - arr[i - 1];
            }
        }

        for (int i = 1; i < arr.length; i++) {
            if (arr[i] - arr[i - 1] == minSub) {
                List<Integer> integers = new ArrayList<>();
                integers.add(arr[i - 1]);
                integers.add(arr[i]);
                result.add(integers);
            }
        }

        return result;
    }
}
